const path = require('path');
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
const smp = new SpeedMeasurePlugin();

module.exports = smp.wrap({
	mode: 'production',
    entry: path.resolve(__dirname, './src/main.js'),
    module: {
		rules: [
			{
				test: /\.js$/,
				exclude: /node_modules/,
				use: [
					{
						loader: 'thread-loader',
						options: {
							workers: 2 // 进程数量 2个
						}
					}
				],
			},
		]
	},
});